Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes transpiles of Typecasts wrapped in parens #998

Conversation

markwpearce
Copy link
Collaborator

Fixes #986

Roku doesn't like when parens are used just to wrap a variable, for example, this will cause a run-time error:

sub addSomeProperty(obj)
      (obj).append({key: "value"})
end sub

this causes a problem when we want to typecast a single variable in order to code completion, for example:

sub addSomeProperty(obj)
      (obj as roAssociativeArray).append({key: "value"})
end sub

This PR changes GroupedExpression so that if the expression that is grouped is a typecast, it does not include the parens.

@markwpearce markwpearce merged commit 2790fe5 into rokucommunity:release-0.66.0 Jan 8, 2024
6 checks passed
@TwitchBronBron TwitchBronBron added this to the v1.0.0 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants